home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / prodpack.zip / DB4PPSRC.EXE / _FILEDRV.PRG < prev    next >
Text File  |  1993-05-04  |  1KB  |  39 lines

  1. FUNCTION _FileDrv
  2. PARAMETER pc_fname
  3. *--------------------------------------------------------------------
  4. * NAME
  5. *   _FILEDRV - returns the drive letter from a DOS filename
  6. *
  7. * SYNOPSIS
  8. *   _FILEDRV( pc_fname )
  9. *
  10. * DESCRIPTION
  11. *   _FILEDRV() determines the drive letter, if any,
  12. *   contained in the file specification pc_fname
  13. *   and returns just the drive letter.
  14. *
  15. *   No upper or lower case conversion is performed.
  16. *   If the filespec contains no drive letter, a
  17. *   null string ("") will be returned.
  18. *
  19. * PARAMETER
  20. *   pc_fname - A character DOS filespec
  21. *
  22. * EXAMPLES
  23. *   lc_drive = _FileDrv( "C:\TEST\FOO.PRG" )
  24. *     ( lc_drive will equal "C" )
  25. *
  26. *   lc_drive = FileDrv( "FOO.PRG" )
  27. *     ( lc_drive will equal "" )
  28. *
  29. * SEE ALSO
  30. *   _FILEPATH(), _FILEROOT(), _FILETYPE()
  31. *
  32. *--------------------------------------------------------------------
  33. RETURN( IIF( AT( ":", pc_fname ) = 2, ;
  34.              LEFT( pc_fname, 1 ), "" ) )
  35. *-- EOF: _FileDrv( pc_fname )
  36.  
  37.  
  38.  
  39.